Skip to content

feat: support IS UNKNOWN expressions - #399

Merged
makenowjust merged 1 commit into
cloudspannerecosystem:mainfrom
apstndb:feat/is-unknown
Aug 16, 2026
Merged

feat: support IS UNKNOWN expressions#399
makenowjust merged 1 commit into
cloudspannerecosystem:mainfrom
apstndb:feat/is-unknown

Conversation

@apstndb

@apstndb apstndb commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for IS [NOT] UNKNOWN expression.

Comment thread ast/ast.go

// IsUnknownExpr is IS UNKNOWN expression node.
//
// {{.Left | sql}} IS {{if .Not}}NOT{{end}} UNKNOWN

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this better?

Suggested change
// {{.Left | sql}} IS {{if .Not}}NOT{{end}} UNKNOWN
// {{.Left | sql}} IS{{if .Not}} NOT{{end}} UNKNOWN

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current form is preferable as documentation. These templates are not intended to specify whitespace exactly, and keeping spaces outside the template actions makes the SQL token boundaries easier to read. Tight adjacency is useful when tokens are intentionally concatenated, such as SAFE_ and CAST, but that is not the case here. This also matches the nearby IsNullExpr and IsBoolExpr templates.

@makenowjust makenowjust left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @apstndb!

@makenowjust
makenowjust merged commit b7b7472 into cloudspannerecosystem:main Aug 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants